<%@ page import="java.util.ArrayList" %>
<%@ page import="bean.User" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page import="java.util.Date" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/9/14/014
  Time: 18:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>人员列表</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/lib/js/jquery3.6.0.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/lib/js/bootstrap.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/lib/css/bootstrap.css">
</head>
<body>
<%
    ArrayList<User> users = new ArrayList<>();
    for (int i = 0; i < 10; i++) {
        User user = new User();
        user.setRegisteTime(new Timestamp(new Date().getTime()));
        user.setUsername(new String(i + "" + i + i + i + i));
        user.setPassword("" + i + (i + 1) + (i + 2));
        users.add(user);
    }
%>
<table class="table table-bordered">
    <tr>
        <th>用户名</th>
        <th>密码</th>
        <th>注册时间</th>
    </tr>

    <%
        for (User user : users) {
            out.write("<tr><td>");
            out.write(user.getUsername());
            out.write("</td><td>" + user.getPassword());
            out.write("</td><td>" + user.getRegisteTime());

            out.write("</td></tr>");
        }
    %>
</table>
</body>
</html>
